package com.longsichao.lscframe.model;

import com.google.gson.Gson;

import java.io.Serializable;

/**
 * @author SONG GUANYULONGSICHAO (leo.song[at]outlook[dot]com)
 */
public abstract class LSCModel implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface OnModelListener {
        /**
         * @param caseId defined by caller.
         * @param model  relate the data model to API. if {@code null}, then failed to get.
         */
        boolean onModel(int caseId, LSCModel model);
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }

}
